<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>园区分布</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
<style type="text/css">
html{height:100%}
body{height:100%;margin:0px;padding:0px;overflow:hidden;}
.container{width:100%;height:100%;}
.controlbar{width:100%;height:20px;line-height:20px;vertical-align:middle;border-top:1px solid #999;overflow:hidden;clear:both;}
.mapinfo{float:left;padding:0px 10px;}
</style>
</head>
<body>
<div id="container" class="container"></div>
<div id="controlbar" class="controlbar">
	<div class="mapinfo" id="mapinfo"></div>
	<div style="clear:both;"></div>
</div>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript" src="https://map.qq.com/api/js?v=2.exp&key=QVPBZ-QJO6X-2S24Q-TVPQO-CRYC2-JMBL2" charset="utf-8"></script>
<script type="text/javascript" src="${path }/res/js/map/map-park.js"></script>
<script type="text/javascript">
var map;
$(function() {
	$(window).bind('resize', function(e){
		_onResize();
		_onResize();
	});
	_onResize();
	
	var center = {lat:35.7502627,lng:113.0696439}, zoom=10;
	if("${empty marker ? '' : '1'}"){
		var lng = '${marker.lng}';
		if(lng){
			center = {lng: parseFloat(lng), lat: parseFloat('${marker.lat}')};
			zoom = 12;
		}
	}
	
	map = new MapPark("container", {
		path: '${path}',
		type: 'park',
		parkid: '${marker.id}',
		center: center,
		zoom: zoom,
		boundary: "河北",
		onMapStatus: function(status){
			$("#mapinfo").html("园区数量="+status.markerNums);
			console.log(status)
		}
	});
	
});
function __UiCall(g){
	map.setParkid(g.globalParam.leftdata);
	if(g.globalParam.datatype == 'PARK'){
		$.get("${path}/parkmap/getMapMarker.json?type=park&id="+g.globalParam.leftdata, function(data){
			if(data && data.lng){
				var center = {lng: data.lng, lat: data.lat};
				map.centerAndZoom(center, 12);
			}else{
				map.centerAndZoom({lat:39.217835,lng:115.858798}, 6);
			}
		});
	}else{
		map.centerAndZoom({lat:39.217835,lng:115.858798}, 6);
	}
	
}
function _onResize(){
	$("#container").height($(window).height() - 22);
}
</script>
</body>
</html>